//package org.liuyunfeng.consumer;
//
//import com.rabbitmq.client.Channel;
//import org.liuyunfeng.domain.Order;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.amqp.support.AmqpHeaders;
//import org.springframework.messaging.handler.annotation.Header;
//import org.springframework.stereotype.Component;
//
//import java.io.IOException;
//
///**
// * @author: TanJingyu
// * @create: 2022-03-21 17:35
// **/
//@Component
//public class OrderListener {
//
//    /**
//     * 延迟队列取消订单
//     */
//    @RabbitListener(queues = "order-cancel", ackMode = "AUTO")
//    public void cancelOrder(Order order, Channel channel, @Header(AmqpHeaders.DELIVERY_TAG) long tag) throws IOException {
//        System.out.println("当前线程：" + Thread.currentThread().getName() + "   当前信道" + channel);
//    }
//}
//
